package org.example.java8.lambda;

public class LambdaUsage1 {

    public static void main(String[] args) {
        Runnable r1=()-> System.out.println("hello");

        Runnable r2=new Runnable() {
            @Override
            public void run() {
                System.out.println("world");
            }
        };
        process(r1);
        process(r2);
        process(()-> System.out.println("java"));

    }

    private static void process(Runnable r){
        r.run();
    }

}
